<div class="easy-upload">
    <ul class="file-list">
        @foreach( $file_data as $key=>$val)
            <div class="file-li">
                <li class="file-list-item" fileid="{{ $key+1 }}">
                    <div class="preview">
                        @if(isset($val['file_type']) && $val['file_type'] == 'image')
                            <a href="{{ $val['file_real_path'] }}">
                                <img class="preview-img" src=" {{ $val['file_real_path']}}" alt="{{$val['file_name']}}">
                            </a>
                        @else
                            <div class="preview-div"></div>
                        @endif
                    </div>
                    <div class="btn-file">
                        <div  class="btn btn-file-del" fileid="{{ $key+1 }}">
                            <span  class="btn-file-del-text delete-file" fileid="{{ $key+1 }}"  data-file="{{ $val['file_path']??null }}">X</span>
                        </div>
                    </div><div class="fileinfo">
                        <p class="fileinfo-text">
                            <span class="fileinfo-text-name" style="margin-top:3%">
                                <a href="{{ $val['file_real_path']??null }}">
                                    {{ $val['file_name']??null}}
                                </a>
                            </span>
                        </p>
                    </div>
                </li>
            </div>
        @endforeach
    </ul>
</div>
